const studentRegister = require("../models/register_model")
const Result = require("../beans/result")

function doStudentRegister(value, msg, callback) {

    studentRegister.register(value, (err, data) => {
        if (err) {
            callback(new Result(err, null, msg[0], 401))
        } else {
            callback(new Result(null, data, msg[1], 200))
        }
    })
}
module.exports = {
    doStudentRegister
}